<div class="dux-page-header am-cf">
    <div class="page-title">
        <a class="am-btn am-btn-primary" href="{url('index')}"> 用户列表</a>
    </div>
    <div class="page-action">
        <a class="am-btn am-btn-danger" href="javascript:location.reload();"><i class="am-icon-refresh"></i></a>
    </div>
</div>
<div class="dux-body">
    <div class="am-panel am-panel-default dux-panel">
        <div class="am-panel-hd">{$assignName}用户</div>
        <div class="am-panel-bd">
            <form class="am-form  am-form-horizontal dux-form" data-dux="form-bind" method="post">
                <fieldset>
                    <div class="am-form-group">
                        <label class="am-u-md-2 am-u-sm-12 am-form-label">角色</label>
                        <div class="am-u-md-10 am-u-sm-12">
                            <select name="role_id" class="am-form-field" data-am-selected="{btnWidth: '100%'}" required>
                                <!--loop{$roleList as $vo}-->
                                <option value="{$vo.role_id}"
                                <!--if{ $vo['role_id'] == $info['role_id'] }--> selected <!--{/if}-->
                                >{$vo.name}</option>
                                <!--{/loop}-->
                            </select>
                        </div>
                    </div>
                    <div class="am-form-group">
                        <label class="am-u-md-2 am-u-sm-12 am-form-label">邮箱</label>
                        <div class="am-u-md-10 am-u-sm-12">
                            <input type="text" name="email" value="{$info.email}" placeholder="请输入邮箱">
                        </div>
                    </div>
                    <div class="am-form-group">
                        <label class="am-u-md-2 am-u-sm-12 am-form-label">电话</label>
                        <div class="am-u-md-10 am-u-sm-12">
                            <input type="text" name="tel" value="{$info.tel}" placeholder="请输入电话">
                        </div>
                    </div>
                    <div class="am-form-group">
                        <label class="am-u-md-2 am-u-sm-12 am-form-label">昵称</label>
                        <div class="am-u-md-10 am-u-sm-12">
                            <input type="text" name="nickname" value="{$info.nickname}" placeholder="请输入昵称">
                        </div>
                    </div>
                    <div class="am-form-group">
                        <label class="am-u-md-2 am-u-sm-12 am-form-label">头像</label>
                        <div class="am-u-md-10 am-u-sm-12">

                            <div class="am-input-group">
                                <input class="am-form-field" name="avatar" id="avatar" value="{$info.avatar}"
                                       placeholder="上传自定义头像">
                                        <span class="am-input-group-btn">
                                            <button class="am-btn am-btn-default" type="button" data-dux="form-upload"
                                                    data-target="#avatar" data-type="jpg,png,bmp"><i
                                                    class="am-icon-upload"></i></button>
                                        </span>
                            </div>
                        </div>
                    </div>

                    <div class="am-form-group">
                        <label class="am-u-md-2 am-u-sm-12 am-form-label">地区</label>
                        <div class="am-u-md-10 am-u-sm-12" data-dux="form-location">

                            <div class="dux-g">
                                <div class="am-u-md-4">
                                    <select name="province" data-province="{$info.province}"></select>
                                </div>
                                <div class="am-u-md-4">
                                    <select name="city" data-city="{$info.city}"></select>
                                </div>
                                <div class="am-u-md-4">
                                    <select name="region" data-district="{$info.region}"></select>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="am-form-group">
                        <label class="am-u-md-2 am-u-sm-12 am-form-label">密码</label>
                        <div class="am-u-md-10 am-u-sm-12">
                            <input class="am-form-field" type="text" onfocus="this.type='password'" name="password" placeholder="不修改密码请留空" >
                        </div>
                    </div>

                    <div class="am-form-group">
                        <label class="am-u-md-2 am-u-sm-12 am-form-label">状态</label>
                        <div class="am-u-md-10 am-u-sm-12">
                            <?php $info['status'] = isset($info['status']) ? $info['status'] : 1;  ?>
                            <label class="am-radio-inline">
                                <!--if{$info['status']}-->
                                <input name="status" value="1" checked="checked" type="radio">
                                <!--{else}-->
                                <input name="status" value="1" type="radio">
                                <!--{/if}-->
                                正常
                            </label>
                            <label class="am-radio-inline">
                                <!--if{!$info['status']}-->
                                <input name="status" checked="checked" value="0" type="radio">
                                <!--{else}-->
                                <input name="status" value="0" type="radio">
                                <!--{/if}-->
                                禁用
                            </label>
                        </div>
                    </div>
                    <div class="am-form-group">
                        <div class="am-u-sm-offset-12 am-u-md-offset-2">
                            <input type="hidden" name="user_id" value="{$info.user_id}">
                            <button class="am-btn am-btn-primary" type="submit" disabled>保存</button>
                        </div>
                    </div>
                </fieldset>
            </form>
        </div>
    </div>
</div>